package com.zhangfuyin.dao;


import com.zhangfuyin.entity.UserEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

@Repository("UserDao")
public class UserDaoImpl implements UserDao {


    @Autowired
    private JdbcTemplate jdbcTemplate;


    @Override
    public void addUser(UserEntity userEntity) {

        String sql = "insert into t_student(id, name) values(? , ? )";

        jdbcTemplate.update(sql,userEntity.getId(),userEntity.getName());

    }
}
